Memory Profiling

Heap profiling (memory profiling) enables you to understand the memory allocation and garbage collection behavior of your applications over time. It helps you identify method calls in the context within which most memory was allocated and combine this information with the number of allocated objects. The Survivor perspective helps you to understand the context within which your long-living objects (objects that survive multiple garbage collection cycles) are created.

Go to Configurations > Actions > Memory Profiling, the Memory Profiling window is displayed

Figure 109: Memory Profiling

2. Click the Add New Session button , and the Topology Details window is displayed.

Figure 110: Topology Details Window

3. Navigate to the instance via the Topology tree and click the Memory Profiling The Memory Profiling Session Configuration window is displayed.

4. Provide the following configuration details:

General Setting

In General Settings, there are following fields which are listed below:

Figure 111: Memory Profiling Session Configuration Window
  • Session Name: Name of the heap profiling session.
  • Duration: Total duration of the session in minutes. Default – 30 minutes, Minimum – 5 minutes, and Maximum – 120 minutes.
  • of Top Class to Capture: Top number of classes having bigger size and count. Default – 20, Minimum – 5, and Maximum – 100.
  • Profiling Type: The options are – Object Count, Object Duration, or both.
  • Description: Description of the heap profiling session.

Advanced Setting

Figure 112: Advance Settings
  • Frequency (in Secs): Number of sessions to be executed per minute. Low (10 sessions/minute), Medium (20 sessions/minute), or High (30 sessions/minute). You can also choose any intermediary values (sessions/minute).
  • TopNClass Find Duration (% of total session time): Time of pass 1 from the total duration (% of total session time) in seconds. Default – 30%, Minimum – 10%, Maximum – 50%.
  • Maximum number of unique allocations to track: Total stack trace during the session. Default – 1000, Minimum – 100, Maximum – 10000.
  • No of Lines/Stack Trace: Depth of the stack trace. Default – 20, Minimum – 5, Maximum – 200.
  • Blacklist Classes: Classes to instrument during instrumenting object constructor.
  • Whitelist Classes: Classes to instrument during instrumenting object constructor.

After the configuration, when you click the Start  button, a new session of Memory Profiling starts. You can view all the sessions in the Memory Profiling window.

Note:

  • When any memory profiling session is started, a running icon is displayed, which denotes the session is running for Mutex lock.
  • You can delete a session by clicking the button. 
Figure 113

5. This window displays the following details:

  • New Memory Allocation
  • Memory Leaks

New Memory Allocation

Class Data

Figure 114: Class Data

Statistics

Figure 115: Statistics

Memory Leaks

Class Data

Figure 116: Class Data

Statistics

Figure 117: Statistics